home *** CD-ROM | disk | FTP | other *** search
- /*
- File: FontHandler.h
-
- Contains: QuickDraw GX to PostScript conversion code.
- File contains data structures and definitions for the font database.
-
-
- Version: Technology: Quickdraw GX 1.1.x
-
- Copyright: © 1991-1997 by Apple Computer, Inc., all rights reserved.
- */
-
- #ifndef __FONTHANDLER__
- #define __FONTHANDLER__
-
- #ifndef __FONTDBASEHANDLER__
- #include "FontDatabase.h"
- #endif
-
- #include <GXFonts.h>
- #include "GXToPSBuildConfig.h"
- #include "GXPrintingUniverse.h"
-
- typedef void *TFontHandlerContext;
- typedef void *fhFont;
-
- typedef enum {
-
- fhNoChange = 0, // Did nothing do effect save levels.
- fhDidSave = 1, // Added a save-level. Client should note graphics state.
- fhDidRestore = 2, // restored to saved level. Client should regenerate grahics state.
- fhDidRestoreSave = (fhDidSave | fhDidRestore) // restored and saved. Client should regenerate graphics state and note it.
-
- } TFHSaveResults;
-
- typedef long TFHSaveResult;
-
- typedef enum {
-
- fhNoDownloadFlags = 0, // Nothing
- fhDownloadAscii = 1, // Must download using 7-bit clean data.
- fhUseTypeZeroFonts = 2 // Use Type-0 (composite) fonts if necessary.
-
- } TFHDownloadFlag;
-
- typedef long TFHDownloadFlags;
-
-
- #define fhTextDataTag 'fhtd'
- #define fh1or2byteTag 'fh12'
-
-
-
-
- /************************ Prototypes ************************/
-
-
- OSErr FontHandlerInit(TFontHandlerContext *context, CGXtoPostScriptDevice *psDevice, TFontDbase docFontDbase, scalerStreamTypeFlag legalStreamTypes, TFHDownloadFlags flags,
- unsigned char* version, unsigned char* revision, unsigned char* product);
-
- OSErr FontHandlerShutdown(TFontHandlerContext context);
-
- OSErr FontHandlerLockContext(TFontHandlerContext context);
-
- OSErr FontHandlerUnlockContext(TFontHandlerContext context);
-
- OSErr FontHandlerResolveShapeFonts(TFontHandlerContext context, gxShape theShape);
-
- OSErr FontHandlerMakeFontAvailable(TFontHandlerContext context, gxStyle theStyle, long *prFontIndex, unsigned char name[256],
- TFHSaveResult *saveLevelResult);
-
- OSErr FontHandlerDoDocumentHeader(TFontHandlerContext context);
-
- #ifndef GXTOPOSTSCRIPTLIBRARY
- OSErr FontHandlerGetProcSetList(TFontHandlerContext context, gxProcSetListPtr procSetList, Boolean needsHex);
- #else
- OSErr FontHandlerDownloadProcSetList(CGXtoPostScriptDevice *psDevice);
- #endif
-
- OSErr FontHandlerSetFontVM(TFontHandlerContext context, long fontVM);
-
- OSErr FontHandlerBalanceSaveLevel(TFontHandlerContext context);
-
- OSErr FontHandlerGetStyleFont(TFontHandlerContext context, gxStyle theStyle, fhFont *theFont);
-
- OSErr FontHandlerGetStyleFontVariations(TFontHandlerContext context, gxStyle theStyle, long *count, gxFontVariation variations[]);
-
- OSErr FontHandlerOutputVariationPSOperator(TFontHandlerContext context, gxStyle theStyle);
-
- #endif
-